package com.lovo.model;

import java.io.Serializable;
import java.util.List;

import lombok.Data;

@Data
public class User implements Serializable {
    /**
     * 用户id
     */
    private Integer userId;

    /**
     * 用户名
     */
    private String userAccount;

    /**
     * 用户密码
     */
    private String userPassword;

    /**
     * 用户电话
     */
    private String userTel;

    /**
     * 邮箱
     */
    private String userEmail;

    /**
     * 真实姓名
     */
    private String userName;

    /**
     * 用户拥有的角色
     */
    @javax.persistence.Transient
    private List<Role> roles;

    /**
     * 用户所能看到的菜单
     */
    @javax.persistence.Transient
    private List<Menu> menus;

    public User() {
    }

    public User(Integer userId, String userAccount, String userPassword, String userTel, String userEmail, String userName) {
        this.userId = userId;
        this.userAccount = userAccount;
        this.userPassword = userPassword;
        this.userTel = userTel;
        this.userEmail = userEmail;
        this.userName = userName;
    }

    public User(String userAccount, String userPassword, String userTel, String userEmail, String userName) {
        this.userAccount = userAccount;
        this.userPassword = userPassword;
        this.userTel = userTel;
        this.userEmail = userEmail;
        this.userName = userName;
    }

    public User(String userAccount, String userTel, String userEmail, String userName) {
        this.userAccount = userAccount;
        this.userTel = userTel;
        this.userEmail = userEmail;
        this.userName = userName;
    }

    private static final long serialVersionUID = 1L;
}